package com.ljf.finance.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ljf.common.model.BasisModel;
import com.ljf.config.annotation.AutoCode;
import com.ljf.finance.enums.FinanceDatVirtualAccountCommonUsedEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.math.BigDecimal;

/**
 * 虚拟账户定义对象  finance_dat_virtual_account
 *
 * @author LJF
 * @since 2024-02-08
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("虚拟账户定义")
@EqualsAndHashCode(callSuper = true)
@TableName("finance_dat_virtual_account")
public class FinanceDatVirtualAccount extends BasisModel {

	private static final long serialVersionUID = 1L;

	/**
	 * Java类型: Long
	 * 数据库类型: bigint
	 * 注释: ID
	 * {@link FinanceDatVirtualAccount#COL_ID}
	 */
	@JsonProperty("id")
	@ApiModelProperty(value = "ID")
	@TableId(value="id", type= IdType.AUTO)
	private Long id;

	/**
	 * Java类型: String
	 * 数据库类型: char(6)
	 * 注释: 编码
	 * {@link FinanceDatVirtualAccount#COL_CODE}
	 */
	@AutoCode
	@TableField("code")
	@JsonProperty("code")
	@ApiModelProperty(value = "编码")
	private String code;

	/**
	 * Java类型: String
	 * 数据库类型: varchar(20)
	 * 注释: 名称
	 * {@link FinanceDatVirtualAccount#COL_NAME}
	 */
	@TableField("name")
	@JsonProperty("name")
	@ApiModelProperty(value = "名称")
	private String name;

	/**
	 * Java类型: String
	 * 数据库类型: varchar(10)
	 * 注释: 账户简称
	 * {@link FinanceDatVirtualAccount#COL_SHORT_NAME}
	 */
	@TableField("short_name")
	@JsonProperty("shortName")
	@ApiModelProperty(value = "账户简称")
	private String shortName;

	/**
	 * Java类型: BigDecimal
	 * 数据库类型: decimal(8,2)
	 * 注释: 实时金额
	 * {@link FinanceDatVirtualAccount#COL_AMOUNT}
	 */
	@TableField("amount")
	@JsonProperty("amount")
	@ApiModelProperty(value = "实时金额")
	private BigDecimal amount;

	/**
	 * Java类型: Integer
	 * 数据库类型: tinyint
	 * 注释: 是否常用(1:是;2:否)
	 * {@link FinanceDatVirtualAccount#COL_COMMON_USED}
	 * {@link FinanceDatVirtualAccountCommonUsedEnum}
	 */
	@TableField("common_used")
	@JsonProperty("commonUsed")
	@ApiModelProperty(value = "是否常用(1:是;2:否)")
	private Integer commonUsed;

	/**
	 * Java类型: Integer
	 * 数据库类型: smallint
	 * 注释: 排序
	 * {@link FinanceDatVirtualAccount#COL_SORT}
	 */
	@TableField("sort")
	@JsonProperty("sort")
	@ApiModelProperty(value = "排序")
	private Integer sort;


	/**
	 * ID
	 * {@link FinanceDatVirtualAccount#id}
	 */
	public static final String COL_ID = "id";
	/**
	 * 编码
	 * {@link FinanceDatVirtualAccount#code}
	 */
	public static final String COL_CODE = "code";
	/**
	 * 名称
	 * {@link FinanceDatVirtualAccount#name}
	 */
	public static final String COL_NAME = "name";
	/**
	 * 账户简称
	 * {@link FinanceDatVirtualAccount#shortName}
	 */
	public static final String COL_SHORT_NAME = "short_name";
	/**
	 * 实时金额
	 * {@link FinanceDatVirtualAccount#amount}
	 */
	public static final String COL_AMOUNT = "amount";
	/**
	 * 是否常用(1:是;2:否)
	 * {@link FinanceDatVirtualAccount#commonUsed}
	 */
	public static final String COL_COMMON_USED = "common_used";
	/**
	 * 排序
	 * {@link FinanceDatVirtualAccount#sort}
	 */
	public static final String COL_SORT = "sort";

}
